package com;

import com.spi.loader.ExtensionLoader;
import com.spi.animal.Animal;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args )
    {
        //获取默认实现类
        Animal defaultExtension = ExtensionLoader.
                getExtensionLoader(Animal.class).
                getDefaultExtension();
        defaultExtension.hello();

        //指定特定的实现类
        Animal animal = ExtensionLoader.
                getExtensionLoader(Animal.class).
                getExtension("cat");
        animal.hello();
    }
}
